package com.ms3ds.deviceData.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ms3ds.common.core.annotation.Excel;
import com.ms3ds.common.core.web.domain.BaseEntity;

/**
 * 传感器数据对象 sensor_data
 * 
 * @author zlw
 * @date 2025-09-21
 */
public class SensorData extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    @Excel(name = "主键ID")
    private Long id;

    /** 传感器id */
    @Excel(name = "传感器ID")
    private Long sensorId;

    /** 数值 */
    @Excel(name = "数值")
    private Double data;

    /** 时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date time;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setSensorId(Long sensorId) 
    {
        this.sensorId = sensorId;
    }

    public Long getSensorId() 
    {
        return sensorId;
    }

    public void setData(Double data) 
    {
        this.data = data;
    }

    public Double getData() 
    {
        return data;
    }

    public void setTime(Date time) 
    {
        this.time = time;
    }

    public Date getTime() 
    {
        return time;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("sensorId", getSensorId())
            .append("data", getData())
            .append("time", getTime())
            .toString();
    }
}
